1. The Field of the Invention
The present invention relates to computing technology; and more specifically, to mechanisms for deterministically performing rule-based dispatch of objects to specific code.
2. Background and Related Art
Computing technology has transformed the way we work and play. Computing systems now take a wide variety of forms including desktop computers, laptop computers, tablet PCs, Personal Digital Assistants (PDAs), household devices and the like. In its most basic form, a computing system includes system memory and one or more processors. Software in the system memory may be executed by the processor to direct the other hardware of the computing system to perform desired functions.
Software can be quite complex, often being compiled or interpreted from many thousands or even millions of lines of source code. In order to provide some organization to the software development process, the task may be broken up into manageable subroutines or methods that perform more specific actions. The methods are then interrelated to perform the more complex functionality of the software as a whole. These methods often receive one or more data structures for processing.
Due to the complexity of the software, it is often a non-trivial task to determine what method should receive a data structure for further processing. For example, when a network service receives a message, the network service must often select between one of potentially many methods to dispatch the message to.
Conventional systems often employ rule-based dispatch in such situations. In particular, a list of rules is kept that provide a mapping between conditions and a method that the data structure is to be dispatched to. Often, there are multiple conditions that apply and multiple rules that apply under the circumstances. Accordingly, it is difficult to foretell in a deterministic manner what method ultimately will process (or has processed) a data structure. If the system were to have a performance deviation during the processing of the data structure, it will be difficult to debug the system since the code that is causing the performance deviation may not be readily identifiable.
Furthermore, in conventional systems, the list of rules is integrated within the executable dispatch code. Accordingly, revising the list or rules involves revising the source code, recompiling, and redistributing the dispatch code. This can take considerable time and resources.
Accordingly, what would be advantageous are mechanisms for performing rule-based dispatch in which it is more predictable what code will process a data structure in cases in which multiple dispatch rules apply, and in which the rules may be more dynamically changed.